{% extends "my/layout.html" %}

{% block my %}
<div class="container">
    <h3>我的SS账号</h3>
    <hr>


    {% for account in accounts %}
    <table class="table table-bordered">
        <tr>
            <td>ID</td>
            <td>{{loop.index}}</td>
        </tr>
        <tr>
            <td>服务</td>
            <td>{{account.server.name}}</td>
        </tr>
        <tr>
            <td>状态</td>
            <td>{{account.display_status}}</td>
        </tr>
        <tr>
            <td>服务器IP</td>
            <td>{{account.ip}}</td>
        </tr>
        <tr>
            <td>服务器端口</td>
            <td>{{account.port}}</td>
        </tr>
        <tr>
            <td>加密密码</td>
            <td>{{account.password}}</td>
        </tr>
        <tr>
            <td>加密算法</td>
            <td>{{account.encryption_type}}</td>
        </tr>
        <tr>
            <td>到期时间</td>
            <td>{{account.expire}}</td>
        </tr>
        <tr>
            <td>二维码</td>
            <td><img src="{{url_for('over.handlers.qr.index', account=account.id)}}" />
                <p>客户端工具可使用"从屏幕上扫描二维码"来自动录入账户</p></td>
        </tr>
        <tr>
            <td>操作</td>
            <td>
                <a href="javascript:void(0)" class="btn btn-success btn-renew">续费</a>
                {% if account.status == 0 %}
                <a href="javascript:void(0)" class="btn btn-success btn-open">开通</a>
                {% endif %}
            </td>
        </tr>
    </table>

    {% endfor %}

</div>

{% endblock %}